# coding=utf-8

from google.appengine.ext import db
import time
import webapp2
from pages.postpage import Topics

class TruncatePage(webapp2.RequestHandler):
    def get(self):
        q = db.GqlQuery("SELECT * FROM Greeting")
        while q.count():
            db.delete(q.fetch(200))
            time.sleep(0.5)
        
        q = Topics.all()
        while q.count():
            db.delete(q.fetch(200))
            time.sleep(0.5)
        self.response.write('done!')
